<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.onlineMIS.ORM.entity.headQ.barcodeGentor.*"%>
<%@ include file="../../common/Style.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>禧乐仓连锁店管理信息系统</title>
<script>

</script>
</head>
<body>
	<script>
function saveCust(){
	if ( $('#updateCustForm').form('validate')){

	    var params=$("#updateCustForm").serialize();
    	$.post("headQCustMgmtJSONAction!createUpdateCust",params, updateCustBKProcess,"json");	
	}
	searchCust();
}
function updateCustBKProcess(data){
	var returnCode = data.returnCode;
	if (returnCode != SUCCESS)
		$.messager.alert('失败信息', data.message,'error');
	else {
		$.messager.alert('提示', data.message,'info');
		$.modalDialog.handler.dialog('close');
		$("#dataGrid").datagrid('reload');
	}		
}
function cancel(){
	$.modalDialog.handler.dialog('close');
}

</script>
	<s:form id="updateCustForm" name="updateCustForm" method="post"
		theme="simple" cssClass="easyui-form">
		<table width="90%" border="0" style="position:relative;top:15px;left:20px;">
		    
			<tr class="InnerTableContent">
				<td align="center"><span style="color:red">*</span><strong>客户ID :</strong></td>
				<td><input type="hidden" name="formBean.tagId"  id="custId0" value="<s:property value="formBean.cust.id"/>"/><input name="formBean.cust.id" id="custId" style="width:220px;" class="easyui-numberbox" data-options="prompt:'请输入精算中客户的ID',editable:<s:if test="formBean.cust.id>0"> false</s:if><s:else>true</s:else>"  value="<s:property value="formBean.cust.id"/>"/>		
				</td>
			</tr>		
			<tr class="InnerTableContent">
				<td align="center"><span style="color:red">*</span><strong>客户名字 :</strong></td>
				<td><s:hidden name="formBean.cust.id" /><input name="formBean.cust.name" id="name" style="width:220px;" class="easyui-textbox" data-options="prompt:'请输入客户名字'"  value="<s:property value="formBean.cust.name"/>"/>		
				</td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>客户地区 :</strong></td>
				<td><s:textfield id="area" name="formBean.cust.area"
						cssClass="easyui-textbox" 
						data-options="required:false,prompt:'请输入客户地区'" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><span style="color:red">*</span><strong>客户地址 :</strong></td>
				<td><s:textfield id="address" name="formBean.cust.address"
						cssClass="easyui-textbox" 
						data-options="required:false,prompt:'请输入客户地址'" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><span style="color:red">*</span><strong>电话号码:</strong></td>
				<td><s:textfield id="phone" name="formBean.cust.phone" style="width:220px;"
						cssClass="easyui-textbox" 
						data-options="required:false,prompt:'请输入客户电话号码'" /></td>

			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>客户简称:</strong></td>
				<td><s:textfield id="phone" name="formBean.cust.nameS" style="width:220px;"
						cssClass="easyui-textbox" 
						data-options="required:false,prompt:'请输入客户简称'" /></td>

			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>备注信息 :</strong></td>
				<td><s:textfield id="comment" name="formBean.cust.comment" style="width:220px;"
						cssClass="easyui-textbox" data-options="prompt:'请输入客户备注信息',validType:'length[0,50]'" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><span style="color:red">*</span><strong>客户状态 :</strong></td>
				<td><s:select name="formBean.cust.status" id="status" align="center"
						cssClass="easyui-combobox" style="width:100px;"
						list="#{'0':'正常','1':'冻结'}" listKey="key" listValue="value" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>期初账目 :</strong></td>
				<td><s:property value="formBean.cust.initialAcctBalance"/></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>期初预存金 :</strong></td>
				<td><s:property value="formBean.cust.prepayInitialAmount"/></td>
			</tr>
			<tr class="InnerTableContent">
				<td></td>
				<td><a onclick="saveCust();"
					href="javascript:void(0);" data-options="iconCls:'icon-ok'" class="easyui-linkbutton">保存</a> <a
					onclick="cancel();" href="javascript:void(0);"  data-options="iconCls:'icon-redo'"
					class="easyui-linkbutton">退出</a></td>
			</tr>
		</table>
	</s:form>


</body>
</html>